#!/usr/bin/env php
<?php

use think\Env;
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------

// 定义项目路径
define('APP_PATH', __DIR__ . '/application/');
ini_set('date.timezone', 'Asia/Shanghai');
require_once 'thinkphp/base.php';
require_once __DIR__ . '/vendor/autoload.php';

/**
 * mysql配置
 * @author shmilylbelva
 */
define('DB_HOST', Env::get('database.hostname', '127.0.0.1')); //数据库地址
define('DB_USER', Env::get('database.username', 'root')); //用户名
define('DB_PWD', Env::get('database.password', 'dbpassword')); //数据库密码
define('DB_NAME', Env::get('database.database', 'laykefu')); //库名
define('DB_PORT', Env::get('database.hostport', 3306)); //端口

define('INTRANET', Env::get('config.ip', '127.0.0.1')); //WebSocket监听IP
define('WS_PORT', Env::get('config.port', '7272')); //WebSocket监听端口
// 标记是全局启动
define('GLOBAL_START', 1);

\think\App::initCommon();
// 加载框架引导文件
require __DIR__ . '/extend/Config/start.php';
